import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/icon/iconfont.css'
import 'lib-flexible'

import './assets/css/common.css' /*引入公共样式*/
import '@/plugins/ui.js'

// loading效果
import { loading, loadingClear } from '@/utils/loading.js'

//gzl
import install from '@/directives/debounce.js'

// rem适配
import 'amfe-flexible/index.js'

import * as custom from '@/utils/filters.js' 
Object.keys(custom).forEach(item => Vue.filter(item, custom[item]))




Vue.prototype.$loading = loading
Vue.prototype.$loadingClear = loadingClear

Vue.use(install)

Vue.config.productionTip = false

// 设置rem

// function initRem() {
//   let cale = window.screen.availWidth > 750 ? 2 : window.screen.availWidth / 375
//   window.document.documentElement.style.fontSize = `${100 * cale}px`
// }

// window.addEventListener('resize', function() {
//   initRem()
// })

// 关闭专利提示
Vue.prototype.$ENDTIME = "2020-12-31 23:59:59"
Vue.prototype.$ClosePrompt = (endTime)=>{
  let nowTime=Date.now()
  endTime = new Date(endTime).getTime();
  if(endTime<=nowTime){
    return false
  }else{
    return true
  }
}



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
